
These programs were run on a 2017 iMac (Retina 5K, 27-inch) using macOS Big Sur Version 11.6


***************************
Do File structure: see folder "Do Files"
***************************

Please run file 0_Master.do to obtain all results. 

The first part of the do file generates the data used in the analysis and saves it into a file called demog_meta.dta. This dataset is simply an appended version of all the files downloaded from the CFPB website (see below) where only the loans with non-missing rate spreads are selected.

The rest of the master do file calls the individual do files. Each do file generates the corresponding figures it is named after.

Please make sure to change the file paths at the top of Master file as necessary.

There are additional notes in each do file.

The do-files require Stata version 14 or above. 

***************************
Figures and Tables used in the paper: see folder "Figures and Logs"
***************************

All figures used in the paper are in this folder and are generated by do files included in the do file folder. Do files are named after the figure or table they are generating.


***************************
Data Sources:
***************************

Important: 
I am not including the original Home Mortgage Disclosure Act (HMDA) dataset used in the analysis because the dataset is very large (in excess of 200GB), I don't own rights to it and it is freely and publicly available from the Consumer Financial Protection Bureau (CFPB) website.

The original dataset was dowloaded on February 1st 2019 from the CFPB website, using this link: https://www.consumerfinance.gov/data-research/hmda/historic-data/

A description of the variables is included on this website as well: https://files.consumerfinance.gov/hmda-historic-data-dictionaries/lar_record_format.pdf

In the dropdown menu, one should select "All Records" in the first box and "Plain language labels and HMDA codes".

Note that all going from the original HMDA dataset to the dataset I use in the analysis are clearly outlined in the do file I use to generate these datasets  (0_data_creation.do).
